<html>
<head><meta charset="utf-8"><title>issue with notify crate · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html">issue with notify crate</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="171160843"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171160843" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171160843">(Jul 18 2019 at 11:33)</a>:</h4>
<p>Hey all, has anyone noticed that completion with <code>notify</code> doesn't work at all? I think it's because the actual implementations are hidden behind target_os cfgs. is there any way to set what I want a certain cfg to be for the purposes of rust-analyzer?</p>



<a name="171160908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171160908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171160908">(Jul 18 2019 at 11:34)</a>:</h4>
<p><a href="https://github.com/passcod/notify/blob/main/src/lib.rs#L184-L194" target="_blank" title="https://github.com/passcod/notify/blob/main/src/lib.rs#L184-L194">https://github.com/passcod/notify/blob/main/src/lib.rs#L184-L194</a></p>



<a name="171160980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171160980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171160980">(Jul 18 2019 at 11:35)</a>:</h4>
<p>ah looks like this is a similar issue: <a href="https://github.com/rust-analyzer/rust-analyzer/issues/1527" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/1527">https://github.com/rust-analyzer/rust-analyzer/issues/1527</a></p>



<a name="171160990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171160990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171160990">(Jul 18 2019 at 11:35)</a>:</h4>
<p>and looks like this was already discussed here! so nm. :) <a href="https://github.com/rust-analyzer/rust-analyzer/issues/1073" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/1073">https://github.com/rust-analyzer/rust-analyzer/issues/1073</a></p>



<a name="171165446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171165446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171165446">(Jul 18 2019 at 12:41)</a>:</h4>
<p>we actually completely ignore cfgs currently, so the problem isn't that anything is hidden behind cfgs, but probably some other problem with whatever implementation actually gets chosen</p>



<a name="171165569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171165569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171165569">(Jul 18 2019 at 12:42)</a>:</h4>
<p>1527 is actually just about the cargo-watch integration</p>



<a name="171165572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171165572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171165572">(Jul 18 2019 at 12:42)</a>:</h4>
<p>ah interesting.</p>



<a name="171165629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171165629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171165629">(Jul 18 2019 at 12:43)</a>:</h4>
<p>how would an implementation get chosen there then as far as rust-analyzer is concerned? is rust-analyzer considering _all_ of the mods/crates used for something like notify?</p>



<a name="171165790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171165790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171165790">(Jul 18 2019 at 12:45)</a>:</h4>
<p>yes, basically it's currently considering all the mods, and what gets chosen for e.g. the <code>RecommendedWatcher</code> type is pretty much random, probably either the first or the last definition</p>



<a name="171165847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171165847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171165847">(Jul 18 2019 at 12:46)</a>:</h4>
<p>got it <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="171165899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171165899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171165899">(Jul 18 2019 at 12:46)</a>:</h4>
<p>is there any feature there that's being considered or issue that I can track? want to make sure I'm keeping an eye on the right thing if this is being looked at more.</p>



<a name="171165924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171165924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171165924">(Jul 18 2019 at 12:47)</a>:</h4>
<p>notify is using some traits, maybe something's not yet working there, although I don't immediately see anything that would explain it</p>



<a name="171165947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171165947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171165947">(Jul 18 2019 at 12:47)</a>:</h4>
<p>it's interesting it was trying to code complete to locally defined "new" fns that I had elsewhere in the project.</p>



<a name="171165953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171165953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171165953">(Jul 18 2019 at 12:47)</a>:</h4>
<p>or rather, when I would jump to definition.</p>



<a name="171165968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171165968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171165968">(Jul 18 2019 at 12:47)</a>:</h4>
<p>so it didn't associate Watcher::new, for example, with the trait's <code>new</code> function.</p>



<a name="171165969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171165969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171165969">(Jul 18 2019 at 12:47)</a>:</h4>
<p>1073 could probably serve as tracking issue for that, though it might also be about cargo-watch</p>



<a name="171166031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171166031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171166031">(Jul 18 2019 at 12:48)</a>:</h4>
<p>yeah, it falls back to searching by symbol if it can't resolve the name properly</p>



<a name="171166039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171166039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171166039">(Jul 18 2019 at 12:48)</a>:</h4>
<p>ahhhh that makes sense</p>



<a name="171166072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171166072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171166072">(Jul 18 2019 at 12:48)</a>:</h4>
<p>which can be rather annoying for names like <code>new</code> ;)</p>



<a name="171166078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171166078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171166078">(Jul 18 2019 at 12:49)</a>:</h4>
<p>haha yeah</p>



<a name="171167855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171167855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171167855">(Jul 18 2019 at 13:07)</a>:</h4>
<p>test</p>



<a name="171167875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/issue%20with%20notify%20crate/near/171167875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gerred Dillon <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/issue.20with.20notify.20crate.html#171167875">(Jul 18 2019 at 13:07)</a>:</h4>
<p>ok good making sure zulip connected my github login with my email. :D</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>